Here is a series of questions about lists. Before doing these exercises, consult the text to review your knowledge about cons, list, and append.
In the following examples, assume the value of lst1 is (list 11 22 33). 1. Which of the following is the value of (cons 44 lst1)? a. (list 44 11 22 33) b. (list (list 44) 11 22 33) c. (list 44) d. (list 11 22 33) e. 44 f. (list 44 55 11 22 33) 2. Which of the following is the value of (append (list 44 55) lst1)? a. (list 44 11 22 33) b. (list (list 44) 11 22 33) c. (list 44) d. (list 11 22 33) e. 44 f. (list 44 55 11 22 33) 3. Which of the following is the value of (append (list 44) lst1)? a. (list 44 11 22 33) b. (list (list 44) 11 22 33) c. (list 44) d. (list 11 22 33) e. 44 f. (list 44 55 11 22 33) 4. Which of the following is the value of (first (cons 44 lst1))? a. (list 44 11 22 33) b. (list (list 44) 11 22 33) c. (list 44) d. (list 11 22 33) e. 44 f. (list 44 55 11 22 33) 5. Which of the following is the value of (rest (cons (list 44) lst1))? a. (list 44 11 22 33) b. (list (list 44) 11 22 33) c. (list 44) d. (list 11 22 33) e. 44 f. (list 44 55 11 22 33)
Last modified: Wed Aug 24 21:53:08 Eastern Daylight Time 2016